{% extends 'base_main.html' %}

{% load static %}

{% block ext_css %}
    {{ block.super }}

    <link rel="stylesheet" href="{% static 'axf/main/cart/css/cart.css' %}">
{% endblock %}

{% block title %}
    {{ block.super }}
    购物车
{% endblock %}


{% block ext_js %}
    {{ block.super }}

    <script type="text/javascript" src="{% static 'Axf/main/cart/js/cart.js' %}"></script>
{% endblock %}

{% block content %}
    {{ block.super }}

    <div id="cart">
        <h3>购物车</h3>
        <div class="full">
            <section>
                <ul>
                    <li>收货人：芳心纵火犯</li>
                    <li>电话：121212</li>
                    <li>地址：*******</li>
                </ul>

                <div class="bill">
                    <p>闪送超市</p>
                    <p>0元起送，买就送鱼一条</p>
                    <a href="#">凑单专区</a>
                </div>

                <div class="delivery">

                    <span>收货时间</span>
                    <span>一天之内送达</span>
                    <a href="#">可预订></a>
                </div>

                <div class="delivery">
                    <span>收货备注</span>
                    <input type="text" placeholder="请输入备注">
                </div>

                {% for cart in carts %}
                    <div class="menuList" cartid="{{ cart.id }}">
                        <div class="confirm">
                            <span>
                                {% if cart.c_is_select %}
                                    <span>✔</span>
                                {% else %}
                                    <span></span>
                                {% endif %}

                            </span>
                        </div>

                        <a href="#">
                            <img src="/static{{ cart.c_goods.productimg }}" alt="">
                            <p>{{ cart.c_goods.productlongname }}</p>
                            <p class="presentPrice">{{ cart.c_goods.price }}</p>
                        </a>

                        <section>
                            <button class="subToCart">-</button>
                            <span>{{ cart.c_goods_num }}</span>
                            <button class="plusToCart">+</button>
                        </section>

                    </div>

                {% endfor %}



                <div class="payTheBill">
                    <div class="all_select">
                        <span>
                            {% if is_all_select %}
                                <span>✔</span>
                            {% else %}
                                <span></span>
                            {% endif %}
                        </span>
                    </div>

                    <p>
                        <span>全选</span>
                        <span>共计：</span>
                        <span id="t_price">&nbsp;{{ total_price }} </span>
                    </p>

                    <span id="make_order">下单</span>

                </div>

            </section>

        </div>
    </div>

{% endblock %}